/* Copyright@Han MA
 * 
 * 03/06/2006 
 * 
 * 
 */
using System;
using System.Collections.Generic;
using System.Text;

namespace WindowsApplication1
{
    public class MyPixel
    {
        public int x;
        public int y; 
        public int hight;
        public int label;
        public int dist;

        public MyPixel()
        {

        }

        public MyPixel(int x, int y)
        {
            this.x = x;
            this.y = y;
        }

        public MyPixel(int x, int y, int hight,int label,int dist)
        {
            this.x = x;
            this.y = y;
            this.hight = hight;
            this.label = label;
            this.dist = dist;
        }
        
        //public int CompareTo(object obj)
        //{
        //    if (y == ((MyPixel)obj).y)
        //        return y.CompareTo(((MyPixel)obj).y);
        //    else
        //    {
        //        return x.CompareTo(((MyPixel)obj).x);
        //    }
           
        //}


        public override bool Equals(Object obj)
        {
            MyPixel p = (MyPixel)obj;
            return (x == p.x && x == p.y);
        }

        public override int GetHashCode()
        {
            return x;
        }


    }
}
